Object.defineProperty(exports, "__esModule", {
    value: !0
}), exports.default = function() {
    var e = wx.getUpdateManager();
    e.onCheckForUpdate(function(e) {
        e.hasUpdate && wx.showLoading({
            title: "更新下载中..."
        });
    }), e.onUpdateReady(function() {
        wx.hideLoading(), wx.showToast({
            title: "正在重启为您更新应用...",
            icon: "none",
            duration: 1e3
        }), setTimeout(function() {
            e.applyUpdate();
        }, 1e3);
    }), e.onUpdateFailed(function() {
        wx.hideLoading(), wx.showToast({
            title: "下载失败...",
            icon: "none"
        });
    });
};